package com.itheima.dbservice;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.mapper.AnnouncementsMapper;
import com.itheima.pojo.Announcement;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class AnnouncementsServiceApiImpl implements AnnouncementsServiceApi{
    @Autowired
    private AnnouncementsMapper announcementsMapper;

    @Override
    public List<Announcement> getAnnouncements(Integer page, Integer pagesize) {
        return announcementsMapper.getAnnouncements((page - 1)*pagesize, pagesize);
    }
}
